﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Platformer
{
    public class Particle
    {
        Texture2D texture;
        Vector2 position = new Vector2(200, 200);
        float opacity;
        float speed;
        float scale;
        double angle;

        public Particle(ContentManager Content, Vector2 position, float scale, float speed, float opacity, double angle)
        {
            this.position = position;
            this.opacity = opacity;
            this.speed = speed;
            this.scale = scale;
            this.angle = angle;

            texture = Content.Load<Texture2D>("Menu/Particles/circle");
        }

        public void Update()
        {
            position += speed * new Vector2((float)Math.Cos(angle), (float)Math.Sin(angle));
        }

        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(texture, position, null, Color.White * opacity, 0f, Vector2.Zero, scale, SpriteEffects.None, 0);
        }

        /* Custom */
       
    }
}
